using System.Reflection.Metadata;
using Microsoft.AspNetCore.Mvc;
using Mysql.Dto;
using Mysql.Hickey;
using Mysql.Model;


namespace Mysql.Conterllers;
[ApiController]
[Route("api/[controller]")]

public class UseConterllers : ControllerBase{
    private readonly IRepost<Blog> _blogs;

    public UseConterllers(IRepost<Blog> blogRe){
        _blogs=blogRe;
    }
    [HttpGet]

    public async Task<IActionResult> Get(){
        var List =await _blogs.GetAll();
        return Ok(List);
    }

    [HttpPost]

    public async Task<IActionResult> post(){
        var obj new Blog{Name=UserCrea.Name,Age=UserCrea.Age};
        
    }

    
}